#! /usr/bin/python
# coding: utf-8

from Tkinter import *

root = Tk()

def printClass(event):
    print '<bind_class>', event.keycode

root.bind_class('Button', '<Return>', printClass)

bt1 = Button(root, text='a button')
bt2 = Button(root, text='other button')

bt1.focus_set()
bt1.grid()
bt2.grid()

root.mainloop()
